package com.day21.send;

import java.io.IOException;
import java.net.DatagramPacket;
import java.net.InetAddress;

public class SendDemo {
    public static void main(String[] args) throws IOException {
        DategramSocket ds = new DategramSocket();
        byte[] bys = "hello".getBytes();
        DatagramPacket dp = new DatagramPacket(bys, bys.length, InetAddress.getByName("192.168.1.2"), 10086);
        ds.send(dp);
        ds.close();

    }

    private static class DategramSocket {
        public void send(DatagramPacket dp) {
        }

        public void close() {

        }
    }
}
